import request from '@/utils/request'

// 查询优惠券领取记录列表
export function listCouponRecord(query) {
  return request({
    url: '/coupon/couponRecord/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券领取记录详细
export function getCouponRecord(couponRecordId) {
  return request({
    url: '/coupon/couponRecord/' + couponRecordId,
    method: 'get'
  })
}

// 新增优惠券领取记录
export function addCouponRecord(data) {
  return request({
    url: '/coupon/couponRecord',
    method: 'post',
    data: data
  })
}

// 修改优惠券领取记录
export function updateCouponRecord(data) {
  return request({
    url: '/coupon/couponRecord',
    method: 'put',
    data: data
  })
}

// 删除优惠券领取记录
export function delCouponRecord(couponRecordId) {
  return request({
    url: '/coupon/couponRecord/' + couponRecordId,
    method: 'delete'
  })
}
